program circle_and_line_1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x1, y1, r, x0, y0: integer;
  d, b1, b2, a1, a2, c1, c2: real;
begin
  write('write x1, y1:');
  readln(x1,y1);
  write('write R:');
  readln(r);
  write('write x0, y0:');
  readln(x0,y0);
  d:=(x1-x0)*(x1-x0)+(y1-y0)*(y1-y0);
  b1:=(r*(y1-y0)-(x1-x0)*sqrt(d-r*r))/d;
  a1:=(r*(x1-x0)+(y1-y0)*sqrt(d-r*r))/d;
  b2:=(r*(y1-y0)+(x1-x0)*sqrt(d-r*r))/d;
  a2:=(r*(x1-x0)-(y1-y0)*sqrt(d-r*r))/d;
  c1:=-a1*x0-b1*y0;
  c2:=-a2*x0-b2*y0;
  writeln('a1: ',a1:0:3);
  writeln('b1: ',b1:0:3);
  writeln('a2: ',a2:0:3);
  writeln('b2: ',b2:0:3);
  writeln('c1: ',c1:0:3);
  writeln('c2: ',c2:0:3);
  readln;
end.
 